﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace Ozone.Views.MethodCenter
{
    /// <summary>
    /// WindowMethod.xaml 的交互逻辑
    /// </summary>
    public partial class WindowMethod : Window
    {
        public bool isOK = true;
        public string m_strName = "";
        public WindowMethod(string title, string Value)
        {
            WindowStartupLocation = WindowStartupLocation.CenterScreen;// 窗体居中
            InitializeComponent();
            txt_FlowName.Text = Value;
            this.ModelTitle.Text = title;
        }

        /// <summary>
        /// 确定
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnCommOK_Click(object sender, RoutedEventArgs e)
        {
            if (string.IsNullOrEmpty(txt_FlowName.Text))
            {
                return;
            }
            isOK = true;
            m_strName = txt_FlowName.Text;
            Close();
        }

        /// <summary>
        /// 取消
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnCommCancel_Click(object sender, RoutedEventArgs e)
        {
            isOK = false;
            Close();
        }
    }
}
